//
//  WGNavigationController.m
//  OvsWork
//
//  Created by 郭壮 on 16/4/15.
//  Copyright © 2016年 Red Persimmon. All rights reserved.
//

#import "WGNavigationController.h"

@interface WGNavigationController ()

@end

@implementation WGNavigationController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

+ (void)initialize
{
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
    
    UINavigationBar* navBar = [UINavigationBar appearance];
    //标题字体设置
    NSMutableDictionary *titleTextAttrs = [NSMutableDictionary dictionary];
    titleTextAttrs[NSForegroundColorAttributeName] = [UIColor whiteColor];
    titleTextAttrs[NSFontAttributeName] = [UIFont boldSystemFontOfSize:17];
    navBar.titleTextAttributes = titleTextAttrs;
    
    [navBar setBarTintColor:ZQColorWithHexString(@"#1F262A")];
    
    UIBarButtonItem *item=[UIBarButtonItem appearance];
    //设置文字颜色
    NSMutableDictionary *itemAttrs=[NSMutableDictionary dictionary];
    itemAttrs[NSFontAttributeName]=[UIFont systemFontOfSize:14];
    itemAttrs[NSForegroundColorAttributeName]=[UIColor whiteColor];
    [item setTitleTextAttributes:itemAttrs forState:UIControlStateNormal];
    
    [navBar setTintColor:[UIColor whiteColor]];
}

-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    if (self.viewControllers.count>0) {
        viewController.hidesBottomBarWhenPushed = YES;
    }

    [super pushViewController:viewController animated:animated];
}


@end
